$OpenBSD: patch-bin_dig_nslookup_c,v 1.2 2017/05/03 20:20:42 sthen Exp $
--- bin/dig/nslookup.c.orig	Fri Apr 14 04:54:11 2017
+++ bin/dig/nslookup.c	Thu Apr 20 09:35:26 2017
@@ -913,8 +913,19 @@ main(int argc, char **argv) {
 	result = isc_app_start();
 	check_result(result, "isc_app_start");
 
+	if (pledge("stdio rpath inet unix dns", NULL) == -1) {
+		perror("pledge");
+		exit(1);
+	}
+
 	setup_libs();
 	progname = argv[0];
+
+	/* inet for network connections, dns for resolv.conf */
+	if (pledge("stdio inet dns", NULL) == -1) {
+		perror("pledge");
+		exit(1);
+	}
 
 	parse_args(argc, argv);
 
